//
//  LSTeamDetailCell.m
//  LookScore
//
//  Created by wr on 2018/4/20.
//  Copyright © 2018年 ChongQingXunTiCompany. All rights reserved.
//

#import "LSTeamDetailCell.h"

#pragma mark 🔥 LSTeamDetailCell
@interface LSTeamDetailCell()

@end
@implementation LSTeamDetailCell


+(LSTeamDetailCell *)TeamDetailCellByTableView:(UITableView *)tableView{
    LSTeamDetailCell *cell=[tableView dequeueReusableCellWithIdentifier:NSStringFromClass(self)];
    if (!cell) {
        cell=[[LSTeamDetailCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass(self)];
        cell.selectionStyle=UITableViewCellSelectionStyleNone;
    }return cell;
}


-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self addContentView];
    }
    
    return self;
}

-(void)addContentView{
    NSInteger width = (LSScreenWidth - 40)/4;
    NSArray *array = @[@"已赛",@"3",@"3",@"3"];
    for (int i = 0; i < 4; i ++) {
        UILabel *lable = [UILabel new];
        lable.text = array[i];
        lable.textColor = LSSubColor5D5D5D;
        lable.font=LSFontSize12;
        [self.contentView addSubview:lable];
        lable.sd_layout.leftEqualToView(self.contentView).offset(20+i*width).topEqualToView(self.contentView).widthIs(width).heightIs(34);
    }
}

@end


#pragma mark 🔥 LSTeamDishRoadDetailCell
@interface LSTeamDishRoadDetailCell()

@end
@implementation LSTeamDishRoadDetailCell


+(LSTeamDishRoadDetailCell *)TeamDishRoadDetailCellByTableView:(UITableView *)tableView{
    LSTeamDishRoadDetailCell *cell=[tableView dequeueReusableCellWithIdentifier:NSStringFromClass(self)];
    if (!cell) {
        cell=[[LSTeamDishRoadDetailCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass(self)];
        cell.selectionStyle=UITableViewCellSelectionStyleNone;
    }return cell;
}


-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self addContentView];
    }
    
    return self;
}

-(void)addContentView{
    NSInteger width = (LSScreenWidth - 20)/6;
    NSArray *array = @[@"17/11/04 20:30",@"半球",@"皇家马德里",@"2:2",@"巴萨罗那",@"平"];
    for (int i = 0; i < 6; i ++) {
        UILabel *lable = [UILabel new];
        lable.text = array[i];
        lable.textColor = LSSubColor5D5D5D;
        lable.font=LSFontSize12;
        lable.numberOfLines = 2;
        lable.textAlignment = NSTextAlignmentCenter;
        [self.contentView addSubview:lable];
        lable.sd_layout.leftEqualToView(self.contentView).offset(10+i*width).topEqualToView(self.contentView).widthIs(width).heightIs(34);
        
    }
}

@end


#pragma mark 🔥 LSTeamMatchCell
@interface LSTeamMatchCell()
@property (nonatomic, strong) UILabel *matchNameLab;
@property (nonatomic, strong) UILabel *timeLab;
@property (nonatomic, strong) UILabel *homeTeamLab;
@property (nonatomic, strong) UILabel *vsLab;
@property (nonatomic, strong) UILabel *guestTeamLab;
@property (nonatomic, strong) UILabel *resultLab;

@end
@implementation LSTeamMatchCell


+(LSTeamMatchCell *)TeamMatchCellByTableView:(UITableView *)tableView{
    LSTeamMatchCell *cell=[tableView dequeueReusableCellWithIdentifier:NSStringFromClass(self)];
    if (!cell) {
        cell=[[LSTeamMatchCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass(self)];
        cell.selectionStyle=UITableViewCellSelectionStyleNone;
    }return cell;
}


-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self addContentView];
    }
    
    return self;
}

-(void)addContentView{
    self.matchNameLab.text = @"世界杯";
    [self.contentView addSubview:self.matchNameLab];
    self.matchNameLab.sd_layout.leftEqualToView(self.contentView).offset(20).topEqualToView(self.contentView).offset(5).widthIs(42).heightIs(16);
    
    
    self.timeLab.text = @"2026/6/8 18:30";
    [self.contentView addSubview:self.timeLab];
    self.timeLab.sd_layout.leftEqualToView(self.matchNameLab).topSpaceToView(self.matchNameLab, 3).widthIs(80).heightIs(9);
    
    self.vsLab.text = @"4:0";
    [self.contentView addSubview:self.vsLab];
    self.vsLab.sd_layout.centerXEqualToView(self.contentView).topEqualToView(self.contentView).widthIs(50).heightIs(35);
    
    self.homeTeamLab.text = @"中国";
    [self.contentView addSubview:self.homeTeamLab];
    self.homeTeamLab.sd_layout.rightSpaceToView(self.vsLab, 0).topEqualToView(self.contentView).widthIs(95).heightIs(35);
    
    self.guestTeamLab.text = @"巴西";
    [self.contentView addSubview:self.guestTeamLab];
    self.guestTeamLab.sd_layout.leftSpaceToView(self.vsLab, 0).topEqualToView(self.contentView).widthIs(95).heightIs(35);
    
    self.resultLab.text = @"胜";
    [self.contentView addSubview:self.resultLab];
    self.resultLab.sd_layout.rightEqualToView(self.contentView).offset(-20).topEqualToView(self.contentView).widthIs(50).heightIs(35);
}
- (UILabel *)matchNameLab{
    if (!_matchNameLab) {
        _matchNameLab = [UILabel new];
        _matchNameLab.backgroundColor = LSNavMainColor;
        _matchNameLab.layer.masksToBounds = YES;
        _matchNameLab.layer.cornerRadius = 2;
        _matchNameLab.textColor = [UIColor whiteColor];
        _matchNameLab.font=LSFontSize11;
        _matchNameLab.textAlignment = NSTextAlignmentCenter;
    }
    return _matchNameLab;
}


- (UILabel *)timeLab{
    if (!_timeLab) {
        _timeLab = [UILabel new];
        _timeLab.textColor = LSTitleGrayColor3;
        _timeLab.textAlignment = NSTextAlignmentLeft;
        _timeLab.font = LSFontSize9;
    }
    return _timeLab;
}

- (UILabel *)homeTeamLab{
    if (!_homeTeamLab) {
        _homeTeamLab = [UILabel new];
        _homeTeamLab.font = LSFontSize12;
        _homeTeamLab.textAlignment = NSTextAlignmentRight;
        _homeTeamLab.textColor = LSSubColor5D5D5D;
    }
    return _homeTeamLab;
}

- (UILabel *)vsLab{
    if (!_vsLab) {
        _vsLab = [UILabel new];
        _vsLab.text = @"VS";
        _vsLab.textColor = LSSubColor5D5D5D;
        _vsLab.font = LSFontSize12;
        _vsLab.textAlignment = NSTextAlignmentCenter;
    }
    return _vsLab;
}

- (UILabel *)guestTeamLab{
    if (!_guestTeamLab) {
        _guestTeamLab = [UILabel new];
        _guestTeamLab.font = LSFontSize12;
        _guestTeamLab.textAlignment = NSTextAlignmentLeft;
        _guestTeamLab.textColor = LSSubColor5D5D5D;
    }
    return _guestTeamLab;
}

- (UILabel *)resultLab{
    if (!_resultLab) {
        _resultLab = [UILabel new];
        _resultLab.font = LSFontSize12;
        _resultLab.textAlignment = NSTextAlignmentRight;
        _resultLab.textColor = LSSubColor5D5D5D;
    }
    return _resultLab;
}
@end

#pragma mark 🔥 LSTeamStandingDetailCell

@interface LSTeamStandingDetailCell()

@end
@implementation LSTeamStandingDetailCell


+(LSTeamStandingDetailCell *)TeamStandingDetailCellByTableView:(UITableView *)tableView{
    LSTeamStandingDetailCell *cell=[tableView dequeueReusableCellWithIdentifier:NSStringFromClass(self)];
    if (!cell) {
        cell=[[LSTeamStandingDetailCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass(self)];
        cell.selectionStyle=UITableViewCellSelectionStyleNone;
    }return cell;
}


-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self addContentView];
    }
    
    return self;
}

-(void)addContentView{
    NSInteger width = (LSScreenWidth - 230)/3;
    NSArray *array = @[@"17/11/04 20:30",@"皇家马德里",@"2：2",@"巴萨罗那",@"平"];
    for (int i = 0; i < 5; i ++) {
        UILabel *lable = [UILabel new];
        lable.text = array[i];
        lable.textColor = LSSubColor5D5D5D;
        lable.numberOfLines = 2;
        lable.font=LSFontSize12;
        
        [self.contentView addSubview:lable];
        
        if (i==0) {
            lable.sd_layout.leftEqualToView(self.contentView).offset(20).topEqualToView(self.contentView).widthIs(width).heightIs(34);
            lable.textAlignment = NSTextAlignmentLeft;
        }else if (i==1){
            lable.sd_layout.leftEqualToView(self.contentView).offset(width+20).topEqualToView(self.contentView).widthIs(95).heightIs(34);
            lable.textAlignment = NSTextAlignmentRight;
        }else if (i==2){
            lable.sd_layout.leftEqualToView(self.contentView).offset(width+115).topEqualToView(self.contentView).widthIs(width).heightIs(34);
            lable.textAlignment = NSTextAlignmentCenter;
        }else if (i==3){
            lable.sd_layout.leftEqualToView(self.contentView).offset(width*2+115).topEqualToView(self.contentView).widthIs(95).heightIs(34);
            lable.textAlignment = NSTextAlignmentLeft;
        }else if (i==4){
            lable.sd_layout.rightEqualToView(self.contentView).offset(-20).topEqualToView(self.contentView).widthIs(width).heightIs(34);
            lable.textAlignment = NSTextAlignmentRight;
        }
        
    }
}

@end


#pragma mark 🔥 LSTeamLineupCell
@interface LSTeamLineupCell()

@end
@implementation LSTeamLineupCell

+(LSTeamLineupCell *)TeamLineupCellByTableView:(UITableView *)tableView{
    LSTeamLineupCell *cell=[tableView dequeueReusableCellWithIdentifier:NSStringFromClass(self)];
    if (!cell) {
        cell=[[LSTeamLineupCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass(self)];
        cell.selectionStyle=UITableViewCellSelectionStyleNone;
    }return cell;
}


-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self addContentView];
    }
    
    return self;
}

-(void)addContentView{
    NSInteger width = (LSScreenWidth - 20)/5;
    NSArray *array = @[@"10",@"齐达内",@"法国",@"中场",@"36"];
    for (int i = 0; i < 5; i ++) {
        UILabel *lable = [UILabel new];
        lable.text = array[i];
        lable.textColor = LSSubColor5D5D5D;
        lable.textAlignment = NSTextAlignmentCenter;
        lable.font=LSFontSize12;
        [self.contentView addSubview:lable];
        lable.sd_layout.leftEqualToView(self.contentView).offset(10+i*width).topEqualToView(self.contentView).widthIs(width).heightIs(34);
    }
}

@end
